package com.ftx.domain.vo;

import com.ftx.common.enums.ErrorCodeEnum;

/**
 * Created by fengtingxin on 2019/6/23.
 */
public class RespnseResult {


    private String code="0";

    private String enMessage;

    private Object returnObject;


    public RespnseResult(){

    }

    public RespnseResult(String code,String enMessage,Object returnObject){
        this.code = code;
        this.enMessage = enMessage;
        this.returnObject = returnObject;
    }

    public RespnseResult(Object returnObject){
        this.code = ErrorCodeEnum.SUCCESS.getErrorCode() + "";
        this.enMessage = ErrorCodeEnum.SUCCESS.getErrorMsg();
        this.returnObject = returnObject;

    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getEnMessage() {
        return enMessage;
    }

    public void setEnMessage(String enMessage) {
        this.enMessage = enMessage;
    }

    public Object getReturnObject() {
        return returnObject;
    }

    public void setReturnObject(Object returnObject) {
        this.returnObject = returnObject;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("RespnseResult{");
        sb.append("code='").append(code).append('\'');
        sb.append(", enMessage='").append(enMessage).append('\'');
        sb.append(", returnObject=").append(returnObject);
        sb.append('}');
        return sb.toString();
    }
}
